package com.object.module.cbb.frontEnd;

import com.object.configuration.utils.Q;
import com.object.module.cbb.entity.CddRechargeDetailsEntity;
import com.object.module.cbb.ov.PaymentPassword;
import com.object.module.cbb.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*
 * 支付
 *
 * */
@RestController
@RequestMapping("/frontend/pay")
public class FrontEndPayController {

    @Autowired
    private PayService payService;

    @PostMapping("/getPaymentCode")
    public Q getPaymentCode(@RequestBody CddRechargeDetailsEntity recharge) {
        return payService.getPaymentCode(recharge);
    }

    @PostMapping("/getPayStatus")
    public Q getPayStatus(@RequestBody CddRechargeDetailsEntity re) {
        return payService.getPayStatus(re);
    }


    @PostMapping("/PaymentPassword")
    public Q PaymentPassword(@RequestBody List<PaymentPassword> paymentPassword) {
        return payService.PaymentPassword(paymentPassword);
    }
}
